<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>购买电子劵</title>
		<link rel="stylesheet" href="__AGENT__/css/iconfont.css" />
		<link rel="stylesheet" href="__AGENT__/css/css.css" />
		<link rel="stylesheet" href="__PUBLIC__/static/layui/css/layui.css" media="all">
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<!--右侧内容-->
					<div class="rigtop">
						<span class="title">购买电子劵</span>
					</div>
					<div class="indrig_con">
						<div class="zizh_conbox" style="padding-top: 20px;">
							<!--选项卡内容开始-->
							<form id="my_form" action="{:url('count/buy_dzj')}" method="post">
								<div class="zizh_con_1">
									<div class="shxx_row chax_row clearfix">
										<div class="left">交易时间：</div>
										<div class="right clearfix">
											<div class="layui-inline">
												<div class="layui-input-inline">
													<input type="text" class="layui-input" name="begin_time" id="begin_time" value="{$begin_time}" placeholder="yyyy年MM月dd日">
												</div>
											</div>
											<i class="chax_line"></i>
											<div class="layui-inline">
												<div class="layui-input-inline">
													<input type="text" class="layui-input" name="end_time" id="end_time" value="{$end_time}" placeholder="yyyy年MM月dd日">
												</div>
											</div>
										</div>
										<div class="chax_rowbox clearfix" style="margin-left: 20px;">
											<button type="submit" onclick="return check_time()" class="htcxbtn">搜索</button>
										</div>
									</div>
							</form>
							<div class="chax_conbox">
								<div class="chax_jiegbt clearfix">
									<div class="chax_jieg">总销售额：
										<?php echo $xfprice ? $xfprice:0.00 ?>元 ,总分佣：
										<?php echo $count_maid ? $count_maid:0.00 ?>鼓励金 ,交易笔数 {$paylog->total()} </div>
									<div class="chax_xzbtnbox">
										<a href="#" onclick="check()"><i class="iconfont icon-daochu"></i>导出</a>
									</div>
								</div>
								<div class="chax_jiegnr">
									<table class="zizh_table1">
										<thead>
											<tr>
												<th style="width: 7%;">订单号</th>
												<th style="width: 7%;">订单类型</th>
												<th style="width: 7%;">会员编号</th>
												<th style="width: 7%;">金额</th>
												<th style="width: 7%">商家分佣</th>
												<th style="width:8%">员工id</th>
												<th style="width:8%">员工分佣</th>
												<!--<th style="width: 9%">创业股东分佣</th>-->
												<th style="width: 7%">推荐人分佣</th>
												<th style="width: 10%;">日期</th>
											</tr>
										</thead>
										<tbody id="tbody">
											{volist name="paylog" id="vo" empty="$empty"}
											<tr>
												<td>{$vo.order_sn}</td>
												<td>{:log_type_msg($vo.order_type)}</td>
												<td>{$vo.uid}</td>
												<td>
													<?php echo $vo['balance']?>
												</td>
												<td>{$vo.tj_agent_commission}</td>
												<td>{$vo.tj_clerk_id}</td>
												<td>{$vo.clerk_commission}</td>
												<!--<td><?php echo $vo['pt_commission']==0?'':$vo['pt_commission'] ?></td>-->
												<td>{$vo.level1_commisssion}</td>
												<td>{$vo.add_time}</td>
											</tr>
											{/volist}
										</tbody>
									</table>

									<div class="fenye" style="display: block;">
										<ul class="pagination">
											{$paylog->render()}
										</ul>
									</div>
								</div>
							</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		{include file="public/footer" /}

	</body>

</html>
<script type="text/javascript">
	layui.use('laydate', function() {
		var laydate = layui.laydate;

		//日期控件
		laydate.render({
			elem: '#begin_time',
			type: 'datetime',
			format: 'yyyy-MM-dd HH:mm:ss'
		});

		laydate.render({
			elem: '#end_time',
			type: 'datetime',
			format: 'yyyy-MM-dd HH:mm:ss'
		});
	})

	function check() {
		var begin_time = $('#begin_time').val();
		var end_time = $('#end_time').val();
		window.location.href = "/agent/count/buy_export.html?begin_time=" + begin_time + "&end_time=" + end_time;
	}
</script>